#!/bin/bash
ls /etc > loggg
while [[ "$filename" != "rc.d" ]]; do
	read filename
	let "count += 1"
done < loggg
echo "$count times read"

#
echo -n "input data: "
read test
echo $test